package com.spider.strategy;

import com.spider.page.HtmlPage;
import com.spider.page.ResultPage;
import com.spider.pool.UriQueueScheduler;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpRequestBase;

/**
 * @author β世界
 * Created on 10:23
 * @Description Html类型的响应处理策越
 */
public class HtmlResponseStrategy implements ResponseStrategy{
    @Override
    public String[] getHandlerContentType() {
        return new String[]{"text/html"};
    }

    @Override
    public ResultPage create(CloseableHttpResponse response, HttpRequestBase httpRequestBase, UriQueueScheduler uriQueueScheduler) {
        return new HtmlPage(response, httpRequestBase, uriQueueScheduler);
    }
}
